package com.wjy.icu.controller;

import com.wjy.icu.common.annotation.PassToken;
import com.wjy.icu.common.core.controller.BaseController;
import com.wjy.icu.common.core.domain.R;
import com.wjy.icu.domain.Equipment;
import com.wjy.icu.domain.vo.EquipmentDto;
import com.wjy.icu.domain.vo.UserDto;
import com.wjy.icu.service.IEquipmentService;
import com.wjy.icu.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description:
 * @author: wangjunyong
 * @date: 2021/10/26 11:29
 */
@RestController
@RequestMapping("icu")
public class IcuController extends BaseController {

    @Autowired
    private IEquipmentService equipmentService;
    /**
     * 条件列出所有的icu设备
     */
    @PassToken
    @PostMapping("list")
    public R list(@RequestBody EquipmentDto dto) {
        startPage();
        List<Equipment> list =  equipmentService.list(dto);
        return result(list);
    }
}
